<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"
+request.getServerName()+":"+request.getServerPort()
+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>个人空间</title>

<link href="<%=request.getContextPath()%>/css/space.css" rel="stylesheet" type="text/css" />
</head>
<!-- 防止重复提交
<script type="text/javascript">
 var checkSubmitFlg = false;
 function checkSubmit() {
  if (!checkSubmitFlg) {
 
// 第一次提交
   checkSubmitFlg = true;
   return true;
  } else {
 
//重复提交
   alert("Submit again!");
   return false;
  }
 }
 </script>
 <script language="javascript">
  var iscommited = false;
  function dosubmit(){
   if(!iscommited){
    iscommited = true;
    return true;
   }else{
    return false;
   }
  }
 </script>
 <script language="javascript">
  function dosubmit1(){
   var input = document.getElementById("submit");
   input.disabled = 'disabled';
  
   return true;
  }
 </script>-->
 <script type="text/javascript">
 function adf(){
  var realName=document.getElementById("userRealName");
  if(realName==null||"".equals(realName))
  {
  alert("表单不能为空！");
  }
}
</script>
<body>&nbsp;  
<div class="all">
		<div class="bodyge">
		<form action="user/addExt" method="post"  id="form"enctype="multipart/form-data" >
				<div class="bodyge-left">
				    <div class="bodyge-left-a1">
					<span class="font-b">个人资料</span>
					</div>
					<div class="body-left-geren2">
						<div class="bodyge-left-gexiao">联系方式</div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">真实姓名:</span><input type="text"
								name="userExt.realName" class="input-a" id="userRealName" onClick="adf()"></div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">性&nbsp;&nbsp;&nbsp;&nbsp;别:</span>
							<!--  
							<input type="radio" name="userExt.sex" value="男"
								class="bodyge-gexiaoming" checked>&nbsp;男&nbsp;
							<input type="radio" name="userExt.sex" value="女">&nbsp;女
							-->
							<s:if test="userExt==null">
							   <s:radio name="userExt.sex" list="%{#{'1':'男','0':'女'}}" value="1"></s:radio>
							</s:if>
							<s:else>
							<s:radio name="userExt.sex" list="%{#{'1':'男','0':'女'}}" ></s:radio>
							</s:else>
						</div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">笔&nbsp;&nbsp;&nbsp;&nbsp;名:</span><input
								type="text" name="userExt.penName" class="input-a">
						</div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">电&nbsp;&nbsp;&nbsp;&nbsp;话:</span><input
								type="text" name="userExt.tel" class="input-a">
						</div><br>
						
						<div class="bodyge-left-gexiao">学识背景</div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">学&nbsp;&nbsp;&nbsp;&nbsp;历:</span>
							<select name="userExt.degree" size="1" class="input-b">
								<option value="大学专科">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;大学专科
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<option value="博士">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;博士
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<option value="大学本科">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;大学本科
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<option value="中专">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;中专
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</select>
						</div>

						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">职&nbsp;&nbsp;&nbsp;&nbsp;称:</span><input
								type="text" name="userExt.position" class="input-a">
						</div>
						<div class="bodyge-left-gejie">
							<span class="bodyge-gexiaoming">工作单位:</span><input type="text"
								class="input-a" name="userExt.company">
						</div>
						<br>
						<div class="bodyge-left-gexiao">
							<span class="bodyge-gexiaotit">会员信息</span>
						</div>

						<div class="bodyge-left-gejie">
						
							<span class="bodyge-gexiaoming">会员头像:</span>
							<div class="bodyge-left-input3">
								<input type="file" name="upload" size="20"
									onChange="javascript:PreviewImg(this);" /><br>
							</div>
							<div class="bodyge-tuxiang"></div>
						</div>
						<%-- <div class="bodyge-left-gejie">
							<br> <span class="bodyge-gexiaoming">用户偏爱:</span>
							<div class="bodyge-left-pianai1">
							  <!--  
								<input type="checkbox" name="userExt.hobby" value="新闻综合 "
									class="bodyge-left-inputbox">&nbsp;新闻综合<br>
								<input type="checkbox" name="userExt.hobby" value="社会科学 "
									class="bodyge-left-inputbox">&nbsp;社会科学<br>
								<input type="checkbox" name="userExt.hobby" value="时尚娱乐 "
									class="bodyge-left-inputbox">&nbsp;时尚娱乐<br>
								<input type="checkbox" name="userExt.hobby" value="女性家庭 "
									class="bodyge-left-inputbox">&nbsp;女性家庭<br>
						-->
							
							<s:checkboxlist  name="userExt.hobby" list="#{1:'新闻综合',2:'社会科学',3:'时尚娱乐',4:'女性家庭 ',5:'军事' }"
							listKey="key" listValue="value" value="{}"
							/> 
							<!--
							<s:checkboxlist  name="userExt.hobby" list="{'新闻综合','社会科学','时尚娱乐','女性家庭 ','军事' }"
							 value="{}"
							/>
							-->
						</div>
						</div> --%>
						<div class="bodyge-left-button3">
							<input type="submit" id="submit" value="保存信息"   />
						</div>
						<div class="bodyge-left-button2">
							<input type="reset" value="取消" />
						</div>
					</div>

				</div>
			</form>

</div>
</div>

</body>
</html>